//
//  AppConfig.h
//  HiMaster3
//
//  Created by jinghao on 15/12/18.
//  Copyright © 2015年 jinghao. All rights reserved.
//

#ifndef AppConfig_h
#define AppConfig_h

//#define DEBUG_VIEW YES

#ifdef DEBUG
#define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define NSLog(...)
#endif


#define WeakSelf(weakSelf)  __weak __typeof(&*self)weakSelf = self;

#define CustomTabBarHeight 44


#define APP_DeviceToken_Key @"app_deviceToken_key"
#define APP_GetuiToken_Key @"app_getuiToken_Key"


//高德地图Key
#define GaodeMapKey @"ab61c329cac501d19f789520d7e6b720"

//百度语音识别
//#define API_KEY @"N3E8yHNkfAAN0NLkXqgcNbtI" // 请修改为您在百度开发者平台申请的API_KEY
//#define SECRET_KEY @"2c8d050894bb486fa0f2b57eb805b0de" // 请修改您在百度开发者平台申请的SECRET_KEY
//#define APPID @"8661624" // 请修改为您在百度开发者平台申请的APP ID
#define YIHUBANG_KEYWORD_ARRAY      @"keywordArray"

//友盟AppKey
#define UMENG_APPKEY @"5833a8ce4ad15653f8001789"
//支付宝
#define AlipayScheme @"MasterAlipay"
//银联 Scheme
#define UnionpayScheme @"MasterUnionpay"

//热更新Jspath appkey
#define JSPATCH_APPKEY @"699c155a9fc54ac5"

//新浪微博
#define WeiboScheme @"wb3789703762"
#define Weibo_APPKEY @"3789703762"
#define WeiboAPPSECRET @"48d969703d542b0ae162659aa69a2718"
#define Weibo_Callback @"3789703762"

//微信以
#define WeixinScheme @"wx01b0dafe49383ddf"
#define Weixin_APPSECRET @"9141f828cdb81a5c07d6259b6744b78a"
//QQ分享
#define QQShareScheme @"QQ41e899e9"
#define QQLoginScheme @"tencent1105762793"
#define QQ_APPKEY @"1105762793"
#define QQ_APPSECRET @"XR3LdkMhThQhR0CT"
//百度key
//#define BaiduMapKey         @"b7ez4aG8bQYImxIvW9BRCXuG"

////个推欢鱼账号
//#define GetuiAppId           @"aKoJ7AqrEg6RxF9gOG6918"
//#define GetuiAppKey          @"zVAXNanL2F9b8zJQ14yhS"
//#define GetuiAppSecret       @"GgFIJy1P966BRqMsBUFcU6"

////个推测试账号
#define GetuiAppId           @"mLnN5vnYRXA6p9QtefKc43"
#define GetuiAppKey          @"0e6IaTPsnm96Z2tVghYNM8"
#define GetuiAppSecret       @"mLnN5vnYRXA6p9QtefKc43"
//客服电话
#define CustomerServicePhone @"4008852446"


#define SharedAppDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)


//颜色

#define masterDefaultColor [UIColor colorWithHex:0xffffff]
#define AppDefaultColor [UIColor colorWithHex:0xfdfdfd]

//自定义Url-------守护模块
#define URL_AMapNaviWalkVC @"safelady://emergency_map"
#define URL_MasterLoginRoot @"safelady://nmpublic_login"
#define URL_UserLoginRoot @"safelady://nmpublic_loginRoot"
#define URL_YihubangSetSecurityCode @"safelady://setSecurityCode"


#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#define ScreenHeight [UIScreen mainScreen].bounds.size.height

// app名称
#define App_Name [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]
// app版本
#define App_Version [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
// app build版本
#define App_build  [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]

#define SystemVerison [[[UIDevice currentDevice] systemVersion] floatValue]

#define RatioBase5(x) 1.0f*ScreenWidth*x/320
#define RatioBase6(x) 1.0f*ScreenWidth*x/375
#define RatioBase6s(x) 1.0f*ScreenWidth*x/414

/** 得到屏幕尺寸 */
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height

/** 设置比例缩放 */
#define W(x) ((x)* kScreenWidth / 320.0)
#define H(y) ((y)* kScreenHeight / 568.0)

//#define API_DOMAIN @"https://testlady.ha-pi.cn/rest/index.php"  //测试版https
//#define WEB_DOMAIN @"https://testlady.ha-pi.cn/"
//#define IMAGE_DOMAIN @"https://testlady.ha-pi.cn/attms"


//#define API_DOMAIN @"http://yihubang.ha-pi.cn/rest/index.php"  //正式版http
//#define WEB_DOMAIN @"http://yihubang.ha-pi.cn"
//#define IMAGE_DOMAIN @"http://yihubang.ha-pi.cn/attms"


//#define API_DOMAIN @"https://lady.ha-pi.cn/rest/index.php"  //正式版https
//#define WEB_DOMAIN @"https://lady.ha-pi.cn/"
//#define IMAGE_DOMAIN @"https://lady.ha-pi.cn/attms"

#define API_DOMAIN @"http://10.0.16.233/patoo-BMS/webapp/rest/index.php"  //郭服务器2
#define WEB_DOMAIN @"http://10.0.16.233/patoo-BMS/webapp/"
#define IMAGE_DOMAIN @"http://10.0.16.233/patoo-BMS/webapp/attms"

//#define API_DOMAIN @"http://192.168.0.100/patoo-BMS/webapp/rest/index.php"  //本地服务器
//#define WEB_DOMAIN @"http://192.168.0.100/patoo-BMS/webapp/"
//#define IMAGE_DOMAIN @"http://192.168.0.100/patoo-BMS/webapp/attms"


//#define API_DOMAIN @"http://app1.ipatoo.cn/rest/index.php"  //正式版https
//#define WEB_DOMAIN @"http://app1.ipatoo.cn/"
//#define IMAGE_DOMAIN @"http://app1.ipatoo.cn/attms"


#define Rest_Version @"1.0"

#define MasterAppId @"1188583750"
#define MasterUpdateAppType  [NSString stringWithFormat:@"updateAppKey_%@",App_Version]


#define MasterPayResultNotification @"MasterPayResultNotification"
#define MasterUserLoginNotification @"MasterUserLoginNotification"
#define MasterRealseShareNotification @"MasterRealseShareNotification"

//缓存key
#define FristStartAppVersionKey @"fristStartApp"

//缓存key
#define FristGetNotificationKey @"firstNotificationKey"

#define StartAppAdKey @"StartAdData"
#define StartAppAlertAdKey @"StartAppAlertAdData"
#define StartAppAlertAdIdsKey @"StartAppAlertAdIdsData"

//用户行为分析记录key
#define UserBehaviourKey @"UserBehaviour"

//用户指南Key
#define DeterrenceFirstKey @"DeterrenceFirst"
#define CallHelpFirstKey @"CallHelpFirst"
#define TestFristKey @"TestFrist"
#define MyCenterFirstKey @"MyCenterFirstKey"

/*!
 @enum
 @brief 聊天类型
 @constant eMessageBodyType_Text 文本类型
 @constant eMessageBodyType_Image 图片类型
 @constant eMessageBodyType_Video 视频类型
 @constant eMessageBodyType_Location 位置类型
 @constant eMessageBodyType_Voice 语音类型
 @constant eMessageBodyType_File 文件类型
 @constant eMessageBodyType_Command 命令类型
 */
typedef enum {
    eMessageBodyType_Text = 1,
    eMessageBodyType_Image,
    eMessageBodyType_Video,
    eMessageBodyType_Location,
    eMessageBodyType_Voice,
    eMessageBodyType_File,
    eMessageBodyType_Command
}MessageBodyType;

/*!
 @enum
 @brief 聊天消息发送状态
 @constant eMessageDeliveryState_Pending 待发送
 @constant eMessageDeliveryState_Delivering 正在发送
 @constant eMessageDeliveryState_Delivered 已发送, 成功
 @constant eMessageDeliveryState_Failure 已发送, 失败
 */
typedef enum {
    eMessageDeliveryState_Pending = 0,
    eMessageDeliveryState_Delivering,
    eMessageDeliveryState_Delivered,
    eMessageDeliveryState_Failure
}MessageDeliveryState;

#endif /* AppConfig_h */
